import request from '../request'

export default {
  tree(params) {
    return request({
      url: '/admin/equipment/tree',
      method: 'get',
      params
    })
  },
  index() {
    return request({
      url: '/admin/equipment/index',
      method: 'get'
    })
  },
  info(id) {
    return request({
      url: '/admin/equipment/info',
      method: 'get',
      params: {
        id
      }
    })
  },
  select() {
    return request({
      url: '/v1/eqList',
      method: 'get'
    })
  },
  create(data) {
    return request({
      url: '/admin/equipment/create',
      method: 'post',
      data
    })
  },
  update(data) {
    return request({
      url: '/admin/equipment/update',
      method: 'post',
      data
    })
  },
  delete(id) {
    return request({
      url: '/admin/equipment/delete',
      method: 'get',
      params: {
        id
      }
    })
  }
}
